#include "../include/head.h"

int epollAdd(int epfd,int addfd,int trigger)
{
    struct epoll_event event;
    if(trigger == 0)
    {
        event.events = EPOLLIN;
    }
    else if(trigger == 1)
    {
        event.events = EPOLLIN | EPOLLET;
    }
    event.data.fd = addfd;
    epoll_ctl(epfd, EPOLL_CTL_ADD, addfd, &event);

    return 0;
}

int epollDel(int epfd,int delfd)
{
    epoll_ctl(epfd, EPOLL_CTL_DEL, delfd,NULL);
    return 0;
}

